﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Business;
using Domain;
using System.Web.Configuration;

namespace HotelBrisaYArenaAdministrador
{
    public partial class ActualizarSobreNos : System.Web.UI.Page
    {

        SeccionBusiness seccionBusiness = new SeccionBusiness(WebConfigurationManager.ConnectionStrings["ApplicationServices"].ToString());
        Seccion seccion;

        protected void Page_load(object sender, EventArgs e)
        { 
            seccion = seccionBusiness.GetSeccion(2);  
 
            if (!Page.IsPostBack) {
                TextBox1.Text = seccion.Descripcion;
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            String descripcion = TextBox1.Text;
            try
            {
                seccionBusiness.ActualizarDescripcionSeccion(descripcion, 2, seccion.IdSeccion);
            }
            catch (Exception)
            { }
            Response.Redirect("PaginaPrincipal.aspx");
        }
    }
}